using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Template: BusinessObjectBase
	{

		#region InnerClass
		public enum TemplateFields
		{
			ID,
			Subject,
			Template_Content
		}
		#endregion

		#region Data Members

			int _iD;
			string _subject;
			string _template_Content;

		#endregion

		#region Properties

		public int  ID
		{
			 get { return _iD; }
			 set
			 {
				 if (_iD != value)
				 {
					_iD = value;
					 PropertyHasChanged("ID");
				 }
			 }
		}

		public string  Subject
		{
			 get { return _subject; }
			 set
			 {
				 if (_subject != value)
				 {
					_subject = value;
					 PropertyHasChanged("Subject");
				 }
			 }
		}

		public string  Template_Content
		{
			 get { return _template_Content; }
			 set
			 {
				 if (_template_Content != value)
				 {
					_template_Content = value;
					 PropertyHasChanged("Template_Content");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("ID", "ID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Subject", "Subject",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Template_Content", "Template_Content",200));
		}

		#endregion

	}
}
